import { createRouter, createWebHashHistory } from 'vue-router'

const router = createRouter({
  history: createWebHashHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      redirect: '/login',
    },
    {
      path: '/login',
      component: () => import('../views/LoginView.vue'),
    },
    {
      path: '/indexs',
      redirect: '/index',
      component: () => import('../views/IndexView.vue'),
      children: [
        {
          path: '/index',
          component: () => import('../views/Index.vue'),
        },
        {
          path: '/Studentlist',
          component: () => import('../views/Studentlist.vue'),
        },
        {
          path: '/Administratorlist',
          component: () => import('../views/Administratorlist.vue'),
        },
        {
          path: '/userjournal',
          component: () => import('../views/userjournal.vue'),
        },
        {
          path: '/Testpaperlist',
          component: () => import('../views/Testpaperlist.vue'),
        },
        {
          path: '/Topiclist',
          component: () => import('../views/Topiclist.vue'),
        },
        {
          path: '/Taskcreation',
          component: () => import('../views/Taskcreation.vue'),
        },
        {
          path: '/tasklist',
          component: () => import('../views/tasklist.vue'),
        },
        {
          path: '/Subjectlist',
          component: () => import('../views/Subjectlist.vue'),
        },
        {
          path: '/Answersheet',
          component: () => import('../views/Answersheet.vue'),
        },
        {
          path: '/Messagelist',
          component: () => import('../views/Messagelist.vue'),
        },
        {
          path: '/Messagesending',
          component: () => import('../views/Messagesending.vue'),
        },
        {
          path: '/Logcenter',
          component: () => import('../views/Logcenter.vue'),
        },
      ],
    },
  ],
})

export default router
